﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Report.aspx.cs" Inherits="Report" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Report</title>
    <script type="text/javascript">
        function showStuff(id1, id2, id3,id4) {
            document.getElementById(id1).style.display = 'block';
            document.getElementById(id2).style.display = 'none';
            document.getElementById(id3).style.display = 'none';
            document.getElementById(id4).style.display = 'none';

        }
    </script>
    <link href="CSS/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="CSS/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">

        function goHome() {

            window.location = "NewDashboard.aspx"

        }
    
    </script>
</head>
<body>
    <input type="button" class="btn btn-success" value="Home" onclick="return goHome();"
        style="float: left" />
    <button onclick="showStuff('Product','Salesuser','Location','stock'); return false;" class="btn btn-primary"
        style="margin-left: 20px;">
        Inventory Details</button>
    <button onclick="showStuff('Salesuser','Product','Location','stock'); return false;" class="btn btn-primary"
        style="margin-left: 20px;">
        Salesuser Details</button>
    <button onclick="showStuff('Location','Product','Salesuser','stock'); return false;" class="btn btn-primary"
        style="margin-left: 20px;">
        Location Details</button>
        <button onclick="showStuff('stock','Location','Product','Salesuser'); return false;" class="btn btn-primary"
        style="margin-left: 20px;">
        Stock Details</button>
    <form id="form1" runat="server">
    <div id="Product" style="display: none; margin-top: 30px; margin-left: 20px;">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
            DataKeyNames="ID" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
                    SortExpression="ID" />
                <asp:BoundField DataField="Product" HeaderText="Product" SortExpression="Product" />
                <asp:BoundField DataField="Brand" HeaderText="Brand" SortExpression="Brand" />
                <asp:BoundField DataField="Model" HeaderText="Model" SortExpression="Model" />
                <asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:AvantoV1ConnectionString3 %>"
            SelectCommand="SELECT [ID], [Product], [Brand], [Model], [Price] FROM [MAS_tInventryDetails]">
        </asp:SqlDataSource>
    </div>
    <div id="Salesuser" style="display: none; margin-top: 30px; margin-left: 20px;">
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" BackColor="LightGoldenrodYellow"
            BorderColor="Tan" BorderWidth="1px" CellPadding="2" DataKeyNames="salesUserID"
            DataSourceID="SqlDataSource2" ForeColor="Black" GridLines="None">
            <AlternatingRowStyle BackColor="PaleGoldenrod" />
            <Columns>
                <asp:BoundField DataField="salesUserID" HeaderText="salesUserID" InsertVisible="False"
                    ReadOnly="True" SortExpression="salesUserID" />
                <asp:BoundField DataField="salesUserLocation" HeaderText="salesUserLocation" SortExpression="salesUserLocation" />
                <asp:BoundField DataField="salesUserName" HeaderText="salesUserName" SortExpression="salesUserName" />
                <asp:BoundField DataField="salesUserEmail" HeaderText="salesUserEmail" SortExpression="salesUserEmail" />
                <asp:BoundField DataField="salesUserMobile" HeaderText="salesUserMobile" SortExpression="salesUserMobile" />
                <asp:BoundField DataField="salesUserPassword" HeaderText="salesUserPassword" SortExpression="salesUserPassword" />
            </Columns>
            <FooterStyle BackColor="Tan" />
            <HeaderStyle BackColor="Tan" Font-Bold="True" />
            <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
            <SortedAscendingCellStyle BackColor="#FAFAE7" />
            <SortedAscendingHeaderStyle BackColor="#DAC09E" />
            <SortedDescendingCellStyle BackColor="#E1DB9C" />
            <SortedDescendingHeaderStyle BackColor="#C2A47B" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:AvantoV1ConnectionString4 %>"
            SelectCommand="SELECT * FROM [MAS_tSalesuser]"></asp:SqlDataSource>
        <br />
    </div>
    <div id="Location" style="display: none; margin-top: 30px; margin-left: 20px;">
        <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" CellPadding="4"
            DataKeyNames="LocationID" DataSourceID="SqlDataSource3" ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="LocationID" HeaderText="LocationID" InsertVisible="False"
                    ReadOnly="True" SortExpression="LocationID" />
                <asp:BoundField DataField="LocationName" HeaderText="LocationName" SortExpression="LocationName" />
                <asp:BoundField DataField="LocationAddress" HeaderText="LocationAddress" SortExpression="LocationAddress" />
                <asp:BoundField DataField="LocationCountry" HeaderText="LocationCountry" SortExpression="LocationCountry" />
                <asp:BoundField DataField="LocationState" HeaderText="LocationState" SortExpression="LocationState" />
                <asp:BoundField DataField="LocationCity" HeaderText="LocationCity" SortExpression="LocationCity" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:AvantoV1ConnectionString5 %>"
            SelectCommand="SELECT * FROM [MAS_tLocation]"></asp:SqlDataSource>
    </div>

    <div id="stock" style="display:none;margin-top: 30px; margin-left: 20px;">
    <asp:GridView ID="GridView4" runat="server"
     onpageindexchanging="GridView4_PageIndexChanging" PageSize="5" AllowPaging="True" 
            CellPadding="4" ForeColor="#333333" GridLines="None">
        <AlternatingRowStyle BackColor="White" />
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
        <br />
        <b>Total Number of Stocks per each Salesperson</b>
        <br />
        <asp:GridView ID="GridView5" runat="server" AllowPaging="True" CellPadding="4" 
            ForeColor="#333333" GridLines="None" 
            onpageindexchanging="GridView5_PageIndexChanging" PageSize="5">
            <AlternatingRowStyle BackColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>



    </div>   

    </form>
</body>
</html>
